import Layout from '@/sheep/layouts/index.vue';
import { isEmpty } from 'lodash';

const shopRoutes = {
  path: '/supply/admin',
  name: 'supply.admin',
  component: Layout,
  meta: {
    title: '供应商',
  },
  children: [],
};

const routeFiles = import.meta.glob('../admin/**/*.service.js', { eager: true });
console.log('routeFiles:',routeFiles);
Object.keys(routeFiles).forEach((key) => {
  let route = routeFiles[key].route || {};
  if (!isEmpty(route)) {
    shopRoutes.children.push(route);
  }
});

export default shopRoutes;
